//===========================================
// AirCrash Game Engine
// Effect with animation
//===========================================
#ifndef EffectAnim_h__
#define EffectAnim_h__

class EffectAnim
{
public:
	EffectAnim(const tstring& file);
	virtual ~EffectAnim();

	void SetMatrixen(const D3DXMATRIX& world, const D3DXMATRIX& view, const D3DXMATRIX& proj);
	void SetMatrixen(const D3DXMATRIX& world);
	void SetTexture(const ID3D10ShaderResourceView* texture);
	void SetEyePos(D3DXVECTOR3& pos);
	void SetLight(D3DXVECTOR3& pos, D3DXVECTOR3& dir, D3DXVECTOR4& ambient, D3DXVECTOR4& diffuse, D3DXVECTOR4& spec);
	void SetBoneMatrix(const vector<D3DXMATRIX>& matrix);

	ID3D10EffectTechnique* GetTech() const;

private:
	ID3D10Effect* m_Effect;
	ID3D10EffectTechnique *m_Tech;

	D3DXMATRIX m_View, m_Proj;

	ID3D10EffectMatrixVariable *m_WorldVar, *m_ViewInv, *m_WVPVar, *m_ViewProjVar;
	ID3D10EffectVectorVariable *m_LightPosVar, *m_LightDiffVar, *m_LightAmbientVar, *m_LightSpecVar;
	ID3D10EffectVectorVariable *m_EyePosVar;
	ID3D10EffectShaderResourceVariable* m_TextureVar;
	ID3D10EffectMatrixVariable *m_BoneArray;

	EffectAnim(const EffectAnim &t);
	EffectAnim& operator= (const EffectAnim &t);
};
#endif // EffectAnim_h__